package com.lmz.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lmz.common.TO.mq.OrderTo;
import com.lmz.common.TO.mq.SeckillOrderTo;
import com.lmz.common.utils.PageUtils;
import com.lmz.order.entity.OrderEntity;
import com.lmz.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author lmz
 * @email ${email}
 * @date 2022-04-17 16:57:01
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;  //订单确认页返回需要的数据

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo); //下单方法

    OrderTo getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity entity);

    PayVo getOrderPay(String orderSn);  //获取当前订单的支付信息

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo); //处理支付宝返回数据

    void createSeckillOrder(SeckillOrderTo seckillOrderTo);

}